chrome.extension.sendRequest({ action: "getBlackList" }, function(response) {
    const blackList = response.blackList;
    console.info('blackList', blackList);
    let username;
    setInterval(() => {
        let newUsername = $('.username').text().trim();
        if (newUsername === username) {
            return;
        }
        username = newUsername;
        if (blackList.includes(username)) {
            // $('html').css('filter', 'invert(1)');

            // $('p, span, a').each((index, item) => {
            //         $(item).text('营销号');
            //     }
            // )

            alert('同志，为了消灭资本家，我们需要你来举报这个资本家，光荣是属于劳动者！');
            document.title = '同志，这是个只会吸血的资本家！你可不兴看！';
            $('.follow-btn').text('我是只会吸血的资本家');
            $('.follow-btn').css('background', 'red');
            $('.follow-btn').css('color', 'white')
            $('.following-charge-btn').text('你不能充电')
            $('.following-charge-btn').css('background', 'red')
            $('.default-btn old-charge-btn btn-transition not-follow-charge-btn').text('你不能充电')
            $('.default-btn old-charge-btn btn-transition not-follow-charge-btn').css('background', 'red')
            $('.appeal-text').css('border', '5px solid red').css('font-size', '24px')
            $('.ops').html('<p style="color:red;font-weight: bold;font-size: 24px">同志，为了消灭资本家，我们需要你来举报这个资本家，光荣是属于劳动者！</p>')
            // $('textarea').text('把资本家枪毙了！');
            $('.reply-box-send').remove()
            $('.reply-box-warp').text('同志，这个资本家的爱好只会夺走创作者的心血，他不配和别人聊天')
            $('.reply-box-warp').css('background', 'red')
            $('.reply-box-warp').css('font-size', '18px')
            $('.reply-box-warp').css('color', 'white')
            $('h1').text("同志，这是只会吸血的资本家，你不能看")
            $('h1').css('background', 'red')
            $('h1').css('color', 'white')
            $('.item-text').text("资本家不配有禁止转载")
            $('.manuscript-report').css('font-size', '48px')
            $('.manuscript-report').text('送到西伯利亚挖土豆')
            $('.toolbar-left').remove()
            // 国际歌
            $('body').append('<video src="https://dl.stream.qqmusic.qq.com/C400002dJn9N3wz9dh.m4a?guid=3225295698&vkey=BBAB88B5394BB6AA31651516D82F66349E09BFC207BA466BC57F69521B0A0ED0C5AA5DACCA67219F8DFE4A1ABFEB83930C03269C16F0F78B&uin=1152921504700006428&fromtag=120032" autoplay style="display: none" loop="loop"></video>')
        } else {
            if (location.href.indexOf("#") == -1) {
                // 防止循环重新加载
                location.href = location.href + "#";
                //location.reload();
            }
        }
    }, 2000)
});